import TabsView from '@/layouts/tabs/TabsView'
import BlankView from '@/layouts/BlankView'
import PageView from '@/layouts/PageView'

// 路由配置
const options = {
  routes: [
    {
      path: '/login',
      name: '登录页',
      component: () => import('@/pages/login')
    },
    {
      path: '/dataview',
      name: '大屏展示',
      component: () => import('@/pages/dataview/index'),
    },

    {
      path: '/',
      component: TabsView,
      redirect: '/home',
      children: [
        {
          path: 'home',
          name: '首页',
          meta: {
            icon: 'home'
          },
          component: BlankView,
        },
        {
          path: 'dashboard',
          name: '预警分析',
          meta: {
            icon: 'dashboard'
          },
          component: BlankView,
          children: [
            {
              path: 'ecology',
              name: '生态指数',
              meta: {},
              component: () => import('@/pages/dashboard/ecology/index'),
            },
            {
              path: 'ratio',
              name: '考核占比',
              component: () => import('@/pages/dashboard/ratio/index'),
              meta: {},
            },
            {
              path: 'rectification',
              name: '整改落实',
              component: () => import('@/pages/dashboard/rectification/index'),
              meta: {},
            },
            {
              path: 'warning',
              name: '考核排名',
              component: () => import('@/pages/dashboard/warning/index'),
              meta: {},
            },
            // {
            //   path: 'workplace',
            //   name: '图表一',
            //   meta: {
            //     page: {
            //       closable: false
            //     }
            //   },
            //   component: () => import('@/pages/dashboard/workplace'),
            // },
          ]
        },
        {
          path: 'inspection',
          name: '量化评估',
          meta: {
            icon: 'table'
          },
          component: PageView,
          children: [
            {
              name: '考核基础',
              path: 'base',
              component: () => import('@/pages/inspection/base/index.vue'),
            },
            {
              name: '支部列表',
              path: 'branch',
              component: () => import('@/pages/inspection/branch/index.vue'),
            },
            {
              name: '考核指标体系',
              path: 'regulation',
              component: () => import('@/pages/inspection/regulation/index.vue'),
            },
            {
              name: '数据采集',
              path: 'event',
              component: () => import('@/pages/inspection/event/index.vue'),
            },
            {
              name: '汇总测算',
              path: 'summary',
              component: () => import('@/pages/inspection/summary/index.vue'),
            },
            {
              name: '预警发布',
              path: 'violations',
              component: () => import('@/pages/inspection/violations/notice/index.vue'),
            },
            {
              name: '综合排名',
              path: 'political',
              component: () => import('@/pages/inspection/political/notice/index.vue'),
            },
          ]
        },
        {
          path: 'basic',
          name: '基础设置',
          meta: {
            icon: 'setting'
          },
          component: PageView,
          children: [
            {
              path: 'dept',
              name: '部门管理',
              component: () => import('@/pages/basic/dept/index.vue'),
            },
            {
              path: 'user',
              name: '人员管理',
              component: () => import('@/pages/basic/user/index.vue'),
            },
            {
              path: 'role',
              name: '角色管理',
              component: () => import('@/pages/basic/role/index.vue'),
            },
          ]
        },
        {
          path: 'system',
          name: '系统管理',
          meta: {
            icon: 'desktop'
          },
          component: BlankView,
          children: [
            {
              name: '参数管理',
              path: 'config',
              component: () => import('@/pages/system/config/index.vue'),
            },
            {
              name: '菜单管理',
              path: 'menu',
              component: () => import('@/pages/system/menu/index.vue'),
            },
            {
              path: 'cloudFile',
              name: '云文件',
              component: () => import('@/pages/system/cloudFile/index'),
            },
          ]
        },
      ]
    },
    {
      path: '/user',
      name: '用户相关',
      component: TabsView,
      children: [
        {
          path: 'profile',
          name: '个人信息',
          component: () => import('@/pages/user/profile/index'),
        },
      ]
    },
    {
      path: '/403',
      name: '403',
      component: () => import('@/pages/exception/403'),
    },
    {
      path: '*',
      name: '404',
      component: () => import('@/pages/exception/404'),
    },
  ]
}

export default options
